package com.jk.smartelderlycare.controller;

import com.jk.smartelderlycare.dto.SysHomestay;
import com.jk.smartelderlycare.interfaces.SysHomestayServiceApi;
import com.jk.smartelderlycare.pojo.PagedResponse;
import com.jk.smartelderlycare.service.SysHomestayService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author hhk
 * @version 1.0
 * @ClassName SysHomestayController
 * @program: smart-elderly-care
 * @description: TODO
 * @date 2024/11/25 17:06
 */
@Slf4j
@RestController
public class SysHomestayController implements SysHomestayServiceApi {
    @Autowired
    private SysHomestayService sysHomestayService;
    /**
     * @description: 分页查询
     * @param: [sysHomestay, pageNum, pageSize]
     * @return: com.jk.smartelderlycare.pojo.PagedResponse<com.jk.smartelderlycare.dto.SysHomestay>
     * @author hhk
     * @date: 2024/11/25 17:07
     */
    @Override
    public PagedResponse<SysHomestay> findSysHomestayPaginationList(SysHomestay sysHomestay, Integer pageNum, Integer pageSize) {
        return sysHomestayService.findSysHomestayPaginationList(sysHomestay,pageNum,pageSize);
    }
    /**
     * @description: 新增
     * @param: [sysHomestay]
     * @return: void
     * @author hhk
     * @date: 2024/11/25 17:07
     */
    @Override
    public void addSysHomestay(SysHomestay sysHomestay) {
        sysHomestayService.addSysHomestay(sysHomestay);
    }
    /**
     * @description: 根据id删除一条数据
     * @param: [homestayId]
     * @return: void
     * @author hhk
     * @date: 2024/11/25 17:08
     */
    @Override
    public void deleteSysHomestayById(Long homestayId) {
        sysHomestayService.deleteSysHomestayById(homestayId);
    }
    /**
     * @description: 根据id回显一条数据
     * @param: [homestayId]
     * @return: com.jk.smartelderlycare.dto.SysHomestay
     * @author hhk
     * @date: 2024/11/25 17:08
     */
    @Override
    public SysHomestay findSysHomestayById(Long homestayId) {
        return sysHomestayService.findSysHomestayById(homestayId);
    }
    /**
     * @description: 修改
     * @param: [sysHomestay]
     * @return: void
     * @author hhk
     * @date: 2024/11/25 17:08
     */
    @Override
    public void updateSysHomestay(SysHomestay sysHomestay) {
        sysHomestayService.updateSysHomestay(sysHomestay);
    }
    /**
     * @description: 审核未通过
     * @param: [sysHomestay]
     * @return: void
     * @author hhk
     * @date: 2024/11/25 17:09
     */
    @Override
    public void upPassStatusById(SysHomestay sysHomestay) {
        sysHomestayService.upPassStatusById(sysHomestay);
    }
/**
 * @description: 审核未通过
 * @param: [sysHomestay]
 * @return: void
 * @author hhk
 * @date: 2024/11/25 17:09
 */
    @Override
    public void FailedStatusById(SysHomestay sysHomestay) {
        sysHomestayService.FailedStatusById(sysHomestay);
    }
    /**
     * @description: 发布房屋列表查询
     * @param: [sysHomestay]
     * @return: java.util.List<com.jk.smartelderlycare.dto.SysHomestay>
     * @author hhk
     * @date: 2024/11/27 15:04
     */
    @Override
    public List<SysHomestay> findSysHomestayList(SysHomestay sysHomestay) {
        return sysHomestayService.findSysHomestayList(sysHomestay);
    }
    /**
     * @description: 全部租房列表查询
     * @param: []
     * @return: java.util.List<com.jk.smartelderlycare.dto.SysHomestay>
     * @author hhk
     * @date: 2024/11/28 16:07
     */
    @Override
    public List<SysHomestay> fimdSysHomestayList() {
        return sysHomestayService.fimdSysHomestayList();
    }
    /**
     * @description: 导入
     * @param: [sysHomestay]
     * @return: void
     * @author hhk
     * @date: 2024/11/30 15:19
     */
    @Override
    public void addHomestay(SysHomestay sysHomestay) {
        sysHomestayService.addHomestay(sysHomestay);
    }
}
